import React, { Component } from 'react';
import { connect } from 'react-redux';
import './index.scss'
// import { Switch } from 'antd-mobile';
import GobackHeader from '../../../../components/user/GobackHeader'
import MySwitch from '../../../../components/user/MySwitch'
class Com extends Component {
	constructor(props){
		super(props)
		this.state={
			checked: false
		}
	}
	systemSound(){
		console.log('systemSound', 'this checked is' + this.state.checked)
	}
	changeValue(x){
		console.log(x)
	}
	render() {
		return (
			<div className="setting">
				<div className="setting-top">
					<GobackHeader title='设置' />
					<div className="setting-content">
						<div className="setting-item">
							<div className="setting-item-left">
								<p className="leftBigFont setting-item-left-top">
									系统内音效
								</p>
								<p className="setting-item-left-buttom">
									如系统内刷新、新消息、点赞等音效
								</p>
							</div>
							<div className="setting-item-right">
								<MySwitch 
									width='1.2rem'
									height= '0.53rem'
									background = 'rgba(228,228,228,1)'
									activebackground = 'rgba(108,182,255,1)'
									circleColor = 'white'
									checked = {true}
									myClick= {this.changeValue}
								/>
							</div>
						</div>
						<div className="setting-item">
							<div className="setting-item-left">
								<p className="leftBigFont setting-item-left-top">
									新消息提醒	
								</p>
								<p className="setting-item-left-buttom">
									关闭后，程序不运行时经无法收到提醒
								</p>
							</div>
							<div className="setting-item-right">
								<MySwitch 
									width='1.2rem'
									height= '0.53rem'
									background = 'rgba(228,228,228,1)'
									activebackground = 'rgba(108,182,255,1)'
									circleColor = 'white'
									checked = {true}
									// myClick= {this.changeValue}
								/>
							</div>
						</div>
						<div className="setting-item">
							<div className="setting-item-left">
								<p className="leftBigFont setting-item-left-top">
									应用内横幅提醒
								</p>
								<p className="setting-item-left-buttom">
									提醒将以横幅形式展现
								</p>
							</div>
							<div className="setting-item-right">
								<MySwitch 
									width='1.2rem'
									height= '0.53rem'
									background = 'rgba(228,228,228,1)'
									activebackground = 'rgba(108,182,255,1)'
									checked = {true}
									circleColor = 'white'
								/>
							</div>
						</div>
						<div className="setting-item">
							<div className="setting-item-left">
								<p className="leftBigFont setting-item-left-top">
									声音提醒
								</p>
								{/* <p className="setting-item-left-buttom">
									提醒将以横幅形式展现
								</p> */}
							</div>
							<div className="setting-item-right">
								<MySwitch 
									width='1.2rem'
									height= '0.53rem'
									background = 'rgba(228,228,228,1)'
									activebackground = 'rgba(108,182,255,1)'
									circleColor = 'white'
								/>
							</div>
						</div>
						<div className="setting-item setting-item-last">
							<div className="setting-item-left">
								<p className="leftBigFont setting-item-left-top">
									震动提醒
								</p>
								{/* <p className="setting-item-left-buttom">
									提醒将以横幅形式展现
								</p> */}
							</div>
							<div className="setting-item-right">
								<MySwitch 
									width='1.2rem'
									height= '0.53rem'
									background = 'rgba(228,228,228,1)'
									activebackground = 'rgba(108,182,255,1)'
									checked = {true}
									circleColor = 'white'
								/>
							</div>
						</div>
					</div>
				</div>
				{/* <MySwitch /> */}
				<div onClick={()=>{
					this.props.history.push('/user/feedback')
				}} className="setting-center setting-item-bottom">
					<span className='leftBigFont'>
						意见反馈
					</span>
					<img src="/images/user_ images/arrowright.png" alt=""/>
				</div>
				<div className="setting-bottom">
					<div className="setting-item-bottom" onClick={()=>{this.props.history.push('/user/resp')}}>
						<span className='leftBigFont'>
							责任声明
						</span>
						<img src="/images/user_ images/arrowright.png" alt=""/>
					</div>
					<div className="setting-item-bottom setting-bottom-about"
						onClick={()=>{
							this.props.history.push('/user/userabout')
						}}
					>
						<span className='leftBigFont'>
							关于
						</span>
						<img src="/images/user_ images/arrowright.png" alt=""/>
					</div>
				</div>
			</div>
		)
	}
}
export default connect()(Com)